package com.shangke.springbootkkyp.dao.sqlProvidr;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class UserSqlProvider {
    /**
     *
     * @return
     */
    public String save(String phone,String code,String xxlSsoSessionid){
//        return "insert into user(phone,code,xxl_sso_sessionid) values ("+phone+","+code+","+xxlSsoSessionid+")";
        return "INSERT INTO `kkyp`.`user`(`phone`, `code`, `xxl_sso_sessionid`) VALUES ('"+phone+"', '"+code+"', '"+xxlSsoSessionid+"')";
    }

    /**
     *
     * @return
     */
    public String findById(Long id){
//        log.error("SELECT * FROM `kkyp`.`user` WHERE id = '"+id+"'");
        return "SELECT * FROM `kkyp`.`user` WHERE id = '"+id+"'";
    }

    public String findMaxId(){
        return "select max(user.id) from user";
    }



}
